FROM registry.cn-hangzhou.aliyuncs.com/glg/sky-agent:8.0.1
MAINTAINER guozi <guozinhs@foxmail.com>

# registry.conf
ENV registry_nacos_application="seata-server"
ENV registry_nacos_serverAddr="127.0.0.1:8848"
ENV registry_nacos_group="SEATA_GROUP"
ENV registry_nacos_namespace="jvs"
ENV registry_nacos_cluster="default"

# config.properties
ENV transport_type="TCP"
ENV transport_server="NIO"
ENV transport_heartbeat="true"
ENV transport_enableClientBatchSendRequest="false"
ENV transport_threadFactory_bossThreadPrefix="NettyBoss"
ENV transport_threadFactory_workerThreadPrefix="NettyServerNIOWorker"
ENV transport_threadFactory_serverExecutorThreadPrefix="NettyServerBizHandler"
ENV transport_threadFactory_shareBossWorker="false"
ENV transport_threadFactory_clientSelectorThreadPrefix="NettyClientSelector"
ENV transport_threadFactory_clientSelectorThreadSize="1"
ENV transport_threadFactory_clientWorkerThreadPrefix="NettyClientWorkerThread"
ENV transport_threadFactory_bossThreadSize="1"
ENV transport_threadFactory_workerThreadSize="default"
ENV transport_shutdown_wait="3"
ENV service_vgroupMapping_my_test_tx_group="default"
ENV service_default_grouplist="127.0.0.1:8091"
ENV service_enableDegrade="false"
ENV service_disableGlobalTransaction="false"
ENV client_rm_asyncCommitBufferLimit="10000"
ENV client_rm_lock_retryInterval="10"
ENV client_rm_lock_retryTimes="30"
ENV client_rm_lock_retryPolicyBranchRollbackOnConflict="true"
ENV client_rm_reportRetryCount="5"
ENV client_rm_tableMetaCheckEnable="false"
ENV client_rm_sqlParserType="druid"
ENV client_rm_reportSuccessEnable="false"
ENV client_rm_sagaBranchRegisterEnable="false"
ENV client_tm_commitRetryCount="5"
ENV client_tm_rollbackRetryCount="5"
ENV client_tm_defaultGlobalTransactionTimeout="60000"
ENV client_tm_degradeCheck="false"
ENV client_tm_degradeCheckAllowTimes="10"
ENV client_tm_degradeCheckPeriod="2000"
ENV store_mode="db"
ENV store_file_dir="file_store/data"
ENV store_file_maxBranchSessionSize="16384"
ENV store_file_maxGlobalSessionSize="512"
ENV store_file_fileWriteBufferCacheSize="16384"
ENV store_file_flushDiskMode="async"
ENV store_file_sessionReloadReadSize="100"
ENV store_db_datasource="druid"
ENV store_db_dbType="mysql"
ENV store_db_driverClassName="com.mysql.jdbc.Driver"
ENV store_db_url="jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true&rewriteBatchedStatements=true"
ENV store_db_user="root"
ENV store_db_password="root"
ENV store_db_minConn="5"
ENV store_db_maxConn="30"
ENV store_db_globalTable="global_table"
ENV store_db_branchTable="branch_table"
ENV store_db_queryLimit="100"
ENV store_db_lockTable="lock_table"
ENV store_db_maxWait="5000"
ENV store_redis_host="127.0.0.1"
ENV store_redis_port="6379"
ENV store_redis_maxConn="10"
ENV store_redis_minConn="1"
ENV store_redis_maxTotal="100"
ENV store_redis_database="0"
ENV store_redis_queryLimit="100"
ENV store_redis_password=""
ENV server_recovery_committingRetryPeriod="1000"
ENV server_recovery_asynCommittingRetryPeriod="1000"
ENV server_recovery_rollbackingRetryPeriod="1000"
ENV server_recovery_timeoutRetryPeriod="1000"
ENV server_maxCommitRetryTimeout="-1"
ENV server_maxRollbackRetryTimeout="-1"
ENV server_rollbackRetryTimeoutUnlockEnable="false"
ENV client_undo_dataValidation="true"
ENV client_undo_logSerialization="jackson"
ENV client_undo_onlyCareUpdateColumns="true"
ENV server_undo_logSaveDays="7"
ENV server_undo_logDeletePeriod="86400000"
ENV client_undo_logTable="undo_log"
ENV client_undo_compress_enable="true"
ENV client_undo_compress_type="zip"
ENV client_undo_compress_threshold="64k"
ENV log_exceptionRate="100"
ENV transport_serialization="seata"
ENV transport_compressor="none"
ENV metrics_enabled="false"
ENV metrics_registryType="compact"
ENV metrics_exporterList="prometheus"
ENV metrics_exporterPrometheusPort="9898"

ENV seata_server_host="127.0.0.1"
ENV seata_server_port="8091"

# add seata file to docker container
RUN mkdir /seata-server
ADD seata/ /seata-server/
# convert env params into config file and start docker container
#CMD /seata-server/bin/seata-config.sh
ENTRYPOINT ["sh","-c","/seata-server/bin/seata-server.sh --host $seata_server_host --port $seata_server_port"]




